<form id="platform-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
    <!--邮件配置-->
    {if request()->get('type') == 'email'}
    <div class="form-group agency">
        <label class="control-label col-xs-12 col-sm-2">{:__('SMTP服务器')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input data-rule="required" class="form-control" placeholder="" name="row[mail_smtp_host]" type="text"  value="{$row.mail_smtp_host|htmlentities}" >
            <p class="help-block-text text-warning">
                * 邮箱smtp服务器地址，例如：smtp.qq.com
            </p>
        </div>
    </div>
    <div class="form-group agency">
        <label class="control-label col-xs-12 col-sm-2">{:__('SMTP端口')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input data-rule="required" class="form-control" placeholder="" name="row[mail_smtp_port]" type="text"  value="{$row.mail_smtp_port|htmlentities}" >
            <p class="help-block-text text-warning">
                * 邮箱smtp端口，例如：25,SSL默认465,TLS默认587
            </p>
        </div>
    </div>

    <div class="form-group agency">
        <label class="control-label col-xs-12 col-sm-2">{:__('SMTP用户名')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input data-rule="required" class="form-control" placeholder="" name="row[mail_smtp_user]" type="text"  value="{$row.mail_smtp_user|htmlentities}" >
            <p class="help-block-text text-warning">
                * SMTP用户名，即绑定的邮箱
            </p>
        </div>
    </div>

    <div class="form-group agency">
        <label class="control-label col-xs-12 col-sm-2">{:__('SMTP密码')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input data-rule="required" class="form-control" placeholder="" name="row[mail_smtp_pass]" type="text"  value="{$row.mail_smtp_pass|htmlentities}" >
            <p class="help-block-text text-warning">
                * SMTP密码
            </p>
        </div>
    </div>

    <div class="form-group agency">
        <label class="control-label col-xs-12 col-sm-2">{:__('发件人邮箱')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input data-rule="required" class="form-control" placeholder="" name="row[mail_from]" type="text"  value="{$row.mail_from|htmlentities}" >
            <p class="help-block-text text-warning">
                *发件人邮箱
            </p>
        </div>
    </div>

    <div class="form-group agency">
        <label class="control-label col-xs-12 col-sm-2">{:__('发件人名称')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input data-rule="required" class="form-control" placeholder="" name="row[mail_smtp_name]" type="text"  value="{$row.mail_smtp_name|htmlentities}" >
            <p class="help-block-text text-warning">
                *发件人名称
            </p>
        </div>
    </div>

    {/if}

    <!--百度站长，熊掌号推送-->
    {if request()->get('type') == 'push'}

    <div class="alert alert-success" role="alert">百度站长配置
        <a href="http://data.zz.baidu.com" target="_blank" class="alert-link">百度站长</a>
    </div>

    <div class="form-group agency">
        <label class="control-label col-xs-12 col-sm-2">{:__('绑定的网站')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input data-rule="required" class="form-control" placeholder="" name="row[zz_site]" type="text"  value="{$row.zz_site|htmlentities}" >
            <p class="help-block-text text-success">
                *百度站长的 网址
            </p>
        </div>
    </div>

    <div class="form-group agency">
        <label class="control-label col-xs-12 col-sm-2">{:__('百度token')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input data-rule="required" class="form-control" placeholder="" name="row[zz_token]" type="text"  value="{$row.zz_token|htmlentities}" >
            <p class="help-block-text text-success">
                *百度站长token
            </p>
        </div>
    </div>
    <div class="alert alert-info" role="alert">熊掌号配置
        <a href="http://data.zz.baidu.com" target="_blank" class="alert-link">熊掌号</a>
    </div>

    <div class="form-group agency">
        <label class="control-label col-xs-12 col-sm-2">{:__('熊掌号的appid')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input data-rule="required" class="form-control" placeholder="" name="row[xzappid]" type="text"  value="{$row.xzappid|htmlentities}" >
            <p class="help-block-text text-info">
                *熊掌号的appid
            </p>
        </div>
    </div>

    <div class="form-group agency">
        <label class="control-label col-xs-12 col-sm-2">{:__('熊掌号的token')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input data-rule="required" class="form-control" placeholder="" name="row[xztoken]" type="text"  value="{$row.xzappid|htmlentities}" >
            <p class="help-block-text text-info">
                *熊掌号的token
            </p>
        </div>
    </div>

    {/if}


    <!--基础配置-->
    {if request()->get('type') == 'basic'}
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('网站前端是否开启')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="radio">
                <label for="site_status_1"><input id="site_status_1" name="row[site_status]" type="radio" value="1" {in name="$row.site_status" value="1"}checked{/in} />开启</label>
                <label for="site_status_0"><input id="site_status_0" name="row[site_status]" type="radio" value="0"  {in name="$row.site_status" value="0"}checked{/in} > 关闭</label>
            </div>
            <p class="help-block-text"></p>
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('网站域名')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input  class="form-control" data-rule="required,url" placeholder="https|http开头" name="row[site_url]" type="text" value="{$row.site_url}">
            <p class="help-block">项目前端首页地址，喂末不需要加 /</p>
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('站点后端名')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input  class="form-control" data-rule="required" placeholder="后端名" name="row[site_name]" type="text" value="{$row.site_name}">
            <p class="help-block"></p>
        </div>
    </div>


    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('站点手机号')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input  class="form-control" data-rule="required" placeholder="站点手机号" name="row[site_phone]" type="text" maxlength="11" value="{$row.site_phone}">
            <p class="help-block"></p>
        </div>
    </div>


    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('站点QQ')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input  class="form-control" data-rule="required" placeholder="站点QQ" name="row[site_qq]" type="text" maxlength="15" value="{$row.site_qq}">
            <p class="help-block"></p>
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('站点Email')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input  class="form-control" data-rule="required" placeholder="站点Email" name="row[site_email]" type="text" value="{$row.site_email}">
            <p class="help-block"></p>
        </div>
    </div>


    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('站点作者')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input  class="form-control" data-rule="required" placeholder="站点作者" name="row[site_author]" type="text" maxlength="" value="{$row.site_author}">
            <p class="help-block"></p>
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('站点关键词')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-site_keywords" data-rule="required" class="form-control" rows="2" name="row[site_keywords]" cols="50">{$row.site_keywords}</textarea>
            <p class="help-block-text text-success">站点关键词</p>
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('站点描述')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-site_description" data-rule="required" class="form-control" rows="4" name="row[site_description]" cols="50">{$row.site_description}</textarea>
            <p class="help-block-text text-success">站点描述</p>
        </div>
    </div>


    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('站点作者介绍')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-site_introduction" data-rule="required" class="form-control" rows="3" name="row[site_introduction]" cols="50">{$row.site_introduction}</textarea>
            <p class="help-block-text text-success"></p>
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('站点作者职业')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-site_career" data-rule="required" class="form-control" rows="2" name="row[site_career]" cols="50">{$row.site_career}</textarea>
            <p class="help-block-text text-success"></p>
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('站点首页描述')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-site_home_desc" data-rule="required" class="form-control" rows="3" name="row[site_home_desc]" cols="50">{$row.site_home_desc}</textarea>
            <p class="help-block-text text-success"></p>
        </div>
    </div>


    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('站点文章页描述')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-site_other" data-rule="required" class="form-control" rows="3" name="row[site_other]" cols="50">{$row.site_other}</textarea>
            <p class="help-block-text text-success"></p>
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('站点备案ICO')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-site_ico" data-rule="required" class="form-control" rows="1" name="row[site_ico]" cols="50">{$row.site_ico}</textarea>
            <p class="help-block-text text-success">备案ICO</p>
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('禁止IP')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-content" data-rule="" class="form-control" rows="5" name="row[site_ip]" cols="50">{$row.site_ip}</textarea>
            <p class="help-block-text text-success">用英文逗号分割</p>
        </div>
    </div>

    {/if}

    <!--上传配置-->
    {if request()->get('type') == 'upload'}
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('文件存储')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="radio">
                <label for="upload_type_1"><input id="upload_type_1" name="row[upload_type]" type="radio" value="1" {in name="$row.upload_type" value="1"}checked{/in} />本地存储</label>
                <label for="upload_type_2"><input id="upload_type_2" name="row[upload_type]" type="radio" value="2" {in name="$row.upload_type" value="2"}checked{/in} > 七牛云存储</label>
                <label for="upload_type_3"><input id="upload_type_3" name="row[upload_type]" type="radio" value="3" {in name="$row.upload_type" value="3"}checked{/in} > 阿里云OSS</label>
                <label for="upload_type_4"><input id="upload_type_4" name="row[upload_type]" type="radio" value="4" {in name="$row.upload_type" value="4"}checked{/in}> 腾讯COS</label>
            </div>
            <p class="help-block-text text-warning">
                * 文件存储的方式
            </p>
        </div>
    </div>


    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('secretKey')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input  class="form-control" data-rule="required" placeholder="secretKey" name="row[secretKey]" type="text" value="{$row.secretKey}">
            <p class="help-block"></p>
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('accessKey')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input  class="form-control" data-rule="required" placeholder="accessKey" name="row[accessKey]" type="text" value="{$row.accessKey}">
            <p class="help-block"></p>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('空间域名')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input  class="form-control" data-rule="required" placeholder="空间域名" name="row[uploadUrl]" type="text"  value="{$row.uploadUrl}">
            <p class="help-block"></p>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('存储空间名称')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input  class="form-control" data-rule="required" placeholder="存储空间名称" name="row[storage_name]" type="text"  value="{$row.storage_name}">
            <p class="help-block"></p>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('storageRegion')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input  class="form-control" data-rule="" placeholder="storageRegion" name="row[storage_region]" type="text"  value="{$row.storage_region}">
            <p class="help-block"></p>
        </div>
    </div>


    {/if}


    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>



</form>